package com.wlw.layoutmanager.adapters;

import com.wlw.layoutmanager.R;
import com.wlw.layoutmanager.beans.SlideBean;

import java.util.List;

public class SlideAdapter extends BaseAdapter<SlideBean> {
    public SlideAdapter(List<SlideBean> data) {
        this(R.layout.item_slide, data);
    }

    public SlideAdapter(int layoutResId, List<SlideBean> data) {
        super(layoutResId, data);
    }

    @Override
    public void onBindView(BaseViewHolder holder, SlideBean slideBean, int position) {
        holder.setImageView(R.id.img_bg, slideBean.getItemBg());
        holder.setTextView(R.id.tv_title, slideBean.getTitle());
        holder.setImageView(R.id.img_user, slideBean.getUserIcon());
        holder.setTextView(R.id.tv_user_say, slideBean.getUserSay());
    }
}
